package com.haibei.view.web;

import java.text.SimpleDateFormat;

/**
 * 常量类
 * 
 * @author liunz
 * 
 */
public class Constant {

	public static final String TAG = "wuyou";
	public static final int LAUNCH_SLEEP_TIME = 400;

	public static final class DomainConstant {
		public static final String WEBVIEW_CACHE_PATH = "wbcache";
		public static String HTTP_URL = "http://api.tao.maxia.cc";
		public static String URI_PREFIX = "content://com.twoba.hybrid.localfile";
		public static String HOME_URL = "content://com.twoba.hybrid.localfile/1.life.maxia.cc";
	}
	
	public static final class CacheConstant {
		public static final String GOODS_CATEGORY_LIST_NAME = "goodscategorylist";
		public static final String GOODS_LIST_NAME = "goodslist";
	}

	public static final class WebViewConstant {
		public static final String WEBVIEW_CACHE_PATH = "wbcache";

	}

	public static final class ResourceConstant {
		public static final boolean CACHE_IO = true;
		public static final String UPDATE_FLAG = "update_flag";
	}
	
	
	public static final class ParamConstant {
		public static final String TAOBAO_NUMID = "taobao_numid";
		public static final String TAOKE_URL = "taoke_url";
	}

	/**
	 * webpage常量
	 * 
	 */
	public static final class WebPage {
		public static final int WEB_LOAD_TIMEOUT = 12;
		public static final int WEB_SINA_TIMEOUT = 13;
		public static final int WEB_QQ_TIMEOUT = 14;
		public static final int WEB_RENREN_TIMEOUT = 15;
		public static final int WEB_INVALID_SLEEP = 102;
	}

	/**
	 * 拍照常量
	 * 
	 * @author liunz
	 */
	public static final class CameraConstant {
		public static final int CAMERA_REQUEST_FILE = 1;
		public static final int CAMERA_RESULTCODE = 2;
		public static final int RESULT_CODE_CANCEL = 37;
		public static final int RESULT_CODE_FINISH = 38;

		public static final int SUPPORT_STATE_UNKOWN = -1;
		public static final int SUPPORT_STATE_NO = 0;
		public static final int SUPPORT_STATE_FACE = 1;
		public static final int SUPPORT_STATE_YES = 2;

		public static final int CAPTURE_MAX_NUM = 8;
		public static final int FROM_PUBLISH_ASSISTANT = 1;
		public static final String FROM = "from";
		public static final String CAPTURE_EXTRA_SIZE = "capture_extra_size";
		public static final String CAPTURE_EXTRA_TAGS = "capture_extra_tags";
		public static final int PUBLISH_PREVIEWIMAGE_PX = 120;
		public static final String LAST_SELECTED = "last_selected";
		public static final String TEMPLATE_CAPTURE_EXTRA = "template_capture_extra";

		public static final int MAX_PHOTO_FILE_SIZE = 2 * 1000 * 1000;

		public static SimpleDateFormat sSimpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
	}

	/**
	 * 路径常量
	 * 
	 * @author liunz
	 */
	public static final class StorageConstant {

		public static String WUYOU_DIRPATH = "wuyou"; // 应用的下载父目录
		public static String WUYOU_PICPATH = "wuyoutaoke"; // 图片的真正下载目录
		public static String WUYOU_REALPATH = WUYOU_DIRPATH + "/" + WUYOU_PICPATH; // 下载目录

		public static String LOG_FILE = "logfile";
		public static String LOG_FILE_STORAGE = WUYOU_DIRPATH + "/" + LOG_FILE;

		public final static String WUYOU_CACHE_FILE = "wuyou_cache";

	}

	/**
	 * 定位常量
	 * 
	 * @author liunz
	 */
	public static final class LocationConstant {

		public static String LAT = "lat";
		public static String LON = "lon";
		public static String CITY_NAME = "city_name";
		public static String CITY_CODE = "city_code";

	}

	/**
	 * 图片常量
	 * 
	 * @author liunz
	 */
	public static final class PicConstant {

		public static final int PHOTO_QUANLITY_META_HIGH = 90;
		public static final int PHOTO_QUANLITY_META = 70;
	}

	/**
	 * 设备常量
	 * 
	 * @author liunz
	 */
	public static final class DeviceConstant {

		public static final String IMEI = "imei";
	}

	/**
	 * 定位常量
	 * 
	 * @author liunz
	 */
	public static final class CodeConstant {

		public final static String KEY = "verification_key";
		public final static String SERIAL = "verification_serial";
		public final static String IS_BIND = "isbind";
		public final static String IS_FROMCAMERA = "fromsms";
	}

	/**
	 * 查询数据库，后台不进行升级 , 软件升级时，才会进行升级
	 */
	public static final class InquiryDB {
		public static final int DB_VERSION = 1; // 版本号
		public static final String DB_NAME = "rssdb"; // 数据库名称

		public static final String TABLE_RSS = "rssinfo"; // rss表

		public static final String FIELD_ID = "id";

		// rss表的字段
		public static final String TABLE_RSS_FIELD_TITLE = "title";
		public static final String TABLE_RSS_FIELD_CONTENT = "content";

		public static final String DB_HOME_FLAF = "1";
		public static final String DB_SIFT_FLAG = "2";
		public static final String DB_RECRUIT_FLAG = "3";

		// public static final Uri CONTENT_INIT_URI = Uri.parse("content://" +
		// DBProvider.AUTHORITY + "/initdata");
	}

	public static final String QUOTE_TOKEN = "\\^ ";

}
